# -*- encoding=utf-8 -*-

from froModuleDrivers.agricultureDeviceDriver import AgricultureDeviceDriver
from froModuleDrivers.nioManager import NioManager
import time

driver_arg = AgricultureDeviceDriver("192.168.1.105", 4001)
manager = NioManager(driver_arg)
manager.run()


# 大棚
driver_arg.openTCurtain(1)
time.sleep(1)
driver_arg.openWater(2)
time.sleep(1)
driver_arg.openRoomFan(3)
time.sleep(1)
driver_arg.openLight(4)
time.sleep(4)

driver_arg.closeTCurtain(1)
time.sleep(1)
driver_arg.closeWater(2)
time.sleep(1)
driver_arg.closeRoomFan(3)
time.sleep(1)
driver_arg.closeLight(4)
time.sleep(1)

manager.shutdownGracefully()

